# def add(x, y):
#     return x + y
#
# def subtract(x, y):
#     return x - y

# New code to open in Notepad
# import subprocess
#
# subprocess.run(["notepad.exe", "subdir/shuxue1.py"])
import os
import subprocess

def find_file(root_dir, target_file):
    for root, dirs, files in os.walk(root_dir):
        if target_file in files:
            return os.path.join(root, target_file)
    return None

# Get the current directory
current_dir = os.getcwd()
target_file = "shuxue1.py"

# Find the full path of the file
file_path = find_file(current_dir, target_file)

if file_path:
    # Open the file with Notepad
    subprocess.run(["notepad.exe", file_path])
else:
    print(f"File {target_file} not found in {current_dir} and its subdirectories.")
